<%@ page import="domain.User" %><%--
  Created by IntelliJ IDEA.
  User: ThinkPad
  Date: 2021/12/25
  Time: 2:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8"%>
<html>
<body>
<div style="text-align: right;margin-right: 100px">
    <%
        User user = (User) request.getSession().getAttribute("user");
        if (user == null||!user.getRole().equals("管理员")){
    %>
    <script type="text/javascript">
        alert("抱歉，您没有访问此页面的权限！");
        window.location="index.jsp";
    </script>
    <%
    }else {
    %>
    已登录（管理员）：<%=user.getUsername()%>&nbsp;&nbsp;|&nbsp;&nbsp;
    <a href="${pageContext.request.contextPath}/logout.jsp">注销</a>
    <%
        }
    %>
</div>
<br />
<a href="manage.jsp"><strong style="margin-left: 50px;color: gold;font-size: xx-large">管理界面首页</strong></a>
<br /><br />
<hr />
<br />
</body>
</html>
